#python中缩进比较严格
# a = input("请输入一个整数：")
# if  a == 1:
#     print("aaa")
#     print("bbb")
#靠缩进来分块

#python中的代码块可以嵌套

# a = input("请输入一个整数:")
# b = input("请输入一个整数:")
# if a == '1':
#     if b == '2':
#         print('b')
#     print("a")
# print("c")

#python中缩进就类似于c++中的{} 同一缩进就在同一个{}中

#输入一个整数，判定是否是奇数

# a = input("请输入一个整数:")
# a = int(a)
# a = int(input('请输入一个整数:'))
# if a % 2 != 0:
#     print('奇数')
# else:
#     print('偶数')


#pathon 中的空语句
#使用pass来占位
# a = input('请输入一个整数:')
# if a == '1':
#     print(a=='1')
# else:
#     print('0')

#python 中的while
# while
# a = int(input('请输入一个整数'))
# while a < 10:
#     print(a)
#     a+=1

#计算1-100的和
# sum = 0
# i = 1
# while i <= 100:
#     sum+=i
#     i+=1
# print(f'sum={sum}')

#计算5的阶乘
# result = 1
# i = 1
# while i <= 5:
#     result *= i
#     i += 1
# print(f'5!={result}')

#求1！+2！+3！+4！+5！
# sum = 0
# result = 1
# i = 1
# j = 1
# #1+
# while i <= 5:
#     while j <= i:
#         result *= j
#         j += 1
#     sum += result
#     j = 1
#     result = 1
#     i += 1
# print(f'1！+2！+3！+4！+5！={sum}')


# result = 1
# sum = 0
# i = 1
# while i <= 5:
#     result *= i
#     sum += result
#     i += 1
# print(f'1！+2！+3！+4！+5！={sum}')


#for 循环
# for i in range(1,11):
#     print(i)
#range 是一个内建函数 包含一系列的整数


# for i in range(2,12,2):
    # print(i)